3.50 \(\int \frac{\cot ^2(x)}{(a+b \cot ^2(x))^{3/2}} \, dx\)

Optimal. Leaf size=59 \[ \frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )}{(a-b)^{3/2}}-\frac{\cot (x)}{(a-b) \sqrt{a+b \cot ^2(x)}} \]

[Out]

ArcTan[(Sqrt[a - b]*Cot[x])/Sqrt[a + b*Cot[x]^2]]/(a - b)^(3/2) - Cot[x]/((a - b)*Sqrt[a + b*Cot[x]^2])

________________________________________________________________________________________

Rubi [A]  time = 0.0957071, antiderivative size = 59, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.235, Rules used = {3670, 471, 377, 203} \[ \frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )}{(a-b)^{3/2}}-\frac{\cot (x)}{(a-b) \sqrt{a+b \cot ^2(x)}} \]

Antiderivative was successfully verified.

[In]

Int[Cot[x]^2/(a + b*Cot[x]^2)^(3/2),x]

[Out]

ArcTan[(Sqrt[a - b]*Cot[x])/Sqrt[a + b*Cot[x]^2]]/(a - b)^(3/2) - Cot[x]/((a - b)*Sqrt[a + b*Cot[x]^2])

Rule 3670

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(c*ff)/f, Subst[Int[(((d*ff*x)/c)^m*(a + b*(ff*x)^n)^p)/(c^
2 + ff^2*x^2), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rule 471

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(e^(n -
1)*(e*x)^(m - n + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(n*(b*c - a*d)*(p + 1)), x] - Dist[e^n/(n*(b*c -
 a*d)*(p + 1)), Int[(e*x)^(m - n)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(m - n + 1) + d*(m + n*(p + q + 1)
+ 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LtQ[p, -1] && GeQ[n
, m - n + 1] && GtQ[m - n + 1, 0] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 377

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\cot ^2(x)}{\left (a+b \cot ^2(x)\right )^{3/2}} \, dx &=-\operatorname{Subst}\left (\int \frac{x^2}{\left (1+x^2\right ) \left (a+b x^2\right )^{3/2}} \, dx,x,\cot (x)\right )\\ &=-\frac{\cot (x)}{(a-b) \sqrt{a+b \cot ^2(x)}}+\frac{\operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right ) \sqrt{a+b x^2}} \, dx,x,\cot (x)\right )}{a-b}\\ &=-\frac{\cot (x)}{(a-b) \sqrt{a+b \cot ^2(x)}}+\frac{\operatorname{Subst}\left (\int \frac{1}{1-(-a+b) x^2} \, dx,x,\frac{\cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )}{a-b}\\ &=\frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )}{(a-b)^{3/2}}-\frac{\cot (x)}{(a-b) \sqrt{a+b \cot ^2(x)}}\\ \end{align*}

Mathematica [B]  time = 0.721489, size = 137, normalized size = 2.32 \[ \frac{(b-a) \cot (x) \sqrt{\frac{b \cot ^2(x)}{a}+1}+\frac{1}{2} \csc (x) \sec (x) ((a-b) \cos (2 x)-a-b) \sqrt{-\frac{(a-b) \cot ^2(x)}{a}} \tanh ^{-1}\left (\frac{\sqrt{-\frac{(a-b) \cot ^2(x)}{a}}}{\sqrt{\frac{b \cot ^2(x)}{a}+1}}\right )}{(a-b)^2 \sqrt{a+b \cot ^2(x)} \sqrt{\frac{b \cot ^2(x)}{a}+1}} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[x]^2/(a + b*Cot[x]^2)^(3/2),x]

[Out]

((-a + b)*Cot[x]*Sqrt[1 + (b*Cot[x]^2)/a] + (ArcTanh[Sqrt[-(((a - b)*Cot[x]^2)/a)]/Sqrt[1 + (b*Cot[x]^2)/a]]*(
-a - b + (a - b)*Cos[2*x])*Sqrt[-(((a - b)*Cot[x]^2)/a)]*Csc[x]*Sec[x])/2)/((a - b)^2*Sqrt[a + b*Cot[x]^2]*Sqr
t[1 + (b*Cot[x]^2)/a])

________________________________________________________________________________________

Maple [A]  time = 0.021, size = 99, normalized size = 1.7 \begin{align*} -{\frac{\cot \left ( x \right ) }{a}{\frac{1}{\sqrt{a+b \left ( \cot \left ( x \right ) \right ) ^{2}}}}}+{\frac{1}{ \left ( a-b \right ) ^{2}{b}^{2}}\sqrt{{b}^{4} \left ( a-b \right ) }\arctan \left ({ \left ( a-b \right ){b}^{2}\cot \left ( x \right ){\frac{1}{\sqrt{{b}^{4} \left ( a-b \right ) }}}{\frac{1}{\sqrt{a+b \left ( \cot \left ( x \right ) \right ) ^{2}}}}} \right ) }-{\frac{b\cot \left ( x \right ) }{a \left ( a-b \right ) }{\frac{1}{\sqrt{a+b \left ( \cot \left ( x \right ) \right ) ^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(x)^2/(a+b*cot(x)^2)^(3/2),x)

[Out]

-cot(x)/a/(a+b*cot(x)^2)^(1/2)+1/(a-b)^2*(b^4*(a-b))^(1/2)/b^2*arctan(b^2*(a-b)/(b^4*(a-b))^(1/2)/(a+b*cot(x)^
2)^(1/2)*cot(x))-b/(a-b)*cot(x)/a/(a+b*cot(x)^2)^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^2/(a+b*cot(x)^2)^(3/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 3.00837, size = 884, normalized size = 14.98 \begin{align*} \left [-\frac{{\left ({\left (a - b\right )} \cos \left (2 \, x\right ) - a - b\right )} \sqrt{-a + b} \log \left (-2 \,{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (2 \, x\right )^{2} - 2 \,{\left ({\left (a - b\right )} \cos \left (2 \, x\right ) - b\right )} \sqrt{-a + b} \sqrt{\frac{{\left (a - b\right )} \cos \left (2 \, x\right ) - a - b}{\cos \left (2 \, x\right ) - 1}} \sin \left (2 \, x\right ) + a^{2} - 2 \, b^{2} + 4 \,{\left (a b - b^{2}\right )} \cos \left (2 \, x\right )\right ) + 4 \,{\left (a - b\right )} \sqrt{\frac{{\left (a - b\right )} \cos \left (2 \, x\right ) - a - b}{\cos \left (2 \, x\right ) - 1}} \sin \left (2 \, x\right )}{4 \,{\left (a^{3} - a^{2} b - a b^{2} + b^{3} -{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} \cos \left (2 \, x\right )\right )}}, -\frac{{\left ({\left (a - b\right )} \cos \left (2 \, x\right ) - a - b\right )} \sqrt{a - b} \arctan \left (-\frac{\sqrt{a - b} \sqrt{\frac{{\left (a - b\right )} \cos \left (2 \, x\right ) - a - b}{\cos \left (2 \, x\right ) - 1}} \sin \left (2 \, x\right )}{{\left (a - b\right )} \cos \left (2 \, x\right ) - b}\right ) + 2 \,{\left (a - b\right )} \sqrt{\frac{{\left (a - b\right )} \cos \left (2 \, x\right ) - a - b}{\cos \left (2 \, x\right ) - 1}} \sin \left (2 \, x\right )}{2 \,{\left (a^{3} - a^{2} b - a b^{2} + b^{3} -{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} \cos \left (2 \, x\right )\right )}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^2/(a+b*cot(x)^2)^(3/2),x, algorithm="fricas")

[Out]

[-1/4*(((a - b)*cos(2*x) - a - b)*sqrt(-a + b)*log(-2*(a^2 - 2*a*b + b^2)*cos(2*x)^2 - 2*((a - b)*cos(2*x) - b
)*sqrt(-a + b)*sqrt(((a - b)*cos(2*x) - a - b)/(cos(2*x) - 1))*sin(2*x) + a^2 - 2*b^2 + 4*(a*b - b^2)*cos(2*x)
) + 4*(a - b)*sqrt(((a - b)*cos(2*x) - a - b)/(cos(2*x) - 1))*sin(2*x))/(a^3 - a^2*b - a*b^2 + b^3 - (a^3 - 3*
a^2*b + 3*a*b^2 - b^3)*cos(2*x)), -1/2*(((a - b)*cos(2*x) - a - b)*sqrt(a - b)*arctan(-sqrt(a - b)*sqrt(((a -
b)*cos(2*x) - a - b)/(cos(2*x) - 1))*sin(2*x)/((a - b)*cos(2*x) - b)) + 2*(a - b)*sqrt(((a - b)*cos(2*x) - a -
 b)/(cos(2*x) - 1))*sin(2*x))/(a^3 - a^2*b - a*b^2 + b^3 - (a^3 - 3*a^2*b + 3*a*b^2 - b^3)*cos(2*x))]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cot ^{2}{\left (x \right )}}{\left (a + b \cot ^{2}{\left (x \right )}\right )^{\frac{3}{2}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)**2/(a+b*cot(x)**2)**(3/2),x)

[Out]

Integral(cot(x)**2/(a + b*cot(x)**2)**(3/2), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cot \left (x\right )^{2}}{{\left (b \cot \left (x\right )^{2} + a\right )}^{\frac{3}{2}}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^2/(a+b*cot(x)^2)^(3/2),x, algorithm="giac")

[Out]

integrate(cot(x)^2/(b*cot(x)^2 + a)^(3/2), x)